﻿<%@ Page Language="c#" CodeBehind="DisplayFlow.aspx.cs" AutoEventWireup="false" Inherits="UDS.SubModule.UnitiveDocument.DocumentFlowPages.DisplayFlowPage" %>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" >
<html>
<head>
  <title>Display Flow</title>
  <uds:Style runat="server" Href="~/css/BasicLayout.css" />
  <style type="text/css">
    .stepTable { border-collapse: collapse; width: 600px; table-layout: fixed; border: solid 1px #000; width: 600px; }
    .stepTable td { border-bottom: solid 2px white; padding: 2px 10px; }
  </style>
</head>
<body>
  <form id="aspNetForm" method="post" runat="server" style="text-align: center;">
  <asp:Repeater runat="server" ID="flowRepeater" EnableViewState="false">
    <HeaderTemplate>
      <table style="text-align: center;">
        <tr>
          <td style="font-size: 14px; font-weight: bold; padding-top: 20px; padding-bottom: 20px;">
            <%= HttpUtility.HtmlEncode(CurrentFlow.Name) %>
          </td>
        </tr>
    </HeaderTemplate>
    <ItemTemplate>
      <tr>
        <td>
          <table class="stepTable">
            <colgroup>
              <col style="width: 100px; background-color: #f0f0f0; text-align: right;" />
              <col style="width: 100%;" />
            </colgroup>
            <tr>
              <td style="width: 100px; background-color: #fff5f5;">第 <%# Container.ItemIndex + 1 %> 步</td>
              <td style="width: 100%; background-color: #fff5f5;"><%# HttpUtility.HtmlEncode( ((FlowStep)Container.DataItem).Name ) %> </td>
            </tr>
            <tr>
              <td>流程规则</td>
              <td><%# Utility.GetEnumDisplayName(((FlowStep)Container.DataItem).FlowRule )%></td>
            </tr>
            <tr>
              <td>强制结束</td>
              <td><%# ((FlowStep)Container.DataItem).RightToFinish ? "能" : "否" %></td>
            </tr>
            <tr>
              <td>是否会签</td>
              <td><%# ((FlowStep)Container.DataItem).PassNumDescription %></td>
            </tr>
            <asp:PlaceHolder runat="server" Visible="<%# ((FlowStep)Container.DataItem).JumpCount > 0 %>">
              <asp:Repeater runat="server" EnableViewState="false" DataSource="<%# GetJumps( (FlowStep)Container.DataItem ) %>">
                <ItemTemplate>
                  <tr>
                    <td>条件 <%# ((FlowJump)Container.DataItem).Priority %> </td>
                    <td>
                      <%# HttpUtility.HtmlEncode(((FlowJump)Container.DataItem).FieldDescription)%> 
                      <%# Utility.GetEnumDisplayName(((FlowJump)Container.DataItem).ComparisonMode)%> 
                      <%# ((FlowJump)Container.DataItem).CompareValue %>
                      <uds:Arrow runat="server" Direction="Right" />
                      <%# HttpUtility.HtmlEncode(((FlowJump)Container.DataItem).StepToName)%> </td>
                  </tr>
                </ItemTemplate>
              </asp:Repeater>
            </asp:PlaceHolder>
          </table>
        </td>
      </tr>
      <tr>
        <td style="font-size: 20px;">
          <uds:Arrow runat="server" Direction="Bottom" />
        </td>
      </tr>
    </ItemTemplate>
    <FooterTemplate>
      <tr>
        <td><a href="#" onclick="window.history.go(-1);">流程结束</a></td>
      </tr>
      </table>
    </FooterTemplate>
  </asp:Repeater>
  </form>
</body>
</html>
